<div ng-if="$ctrl.page" class="row" ng-init="$ctrl.init()">
  <div class="col-9">
    <input
      type="text"
      class="form-control mb-4"
      placeholder="Enter new Title then press enter to search"
      ng-model="$ctrl.request.keyword"
      ng-enter="$ctrl.getList()"
    />
  </div>
  <div class="col-3">
    <input
      type="number"
      ng-enter="$ctrl.getList()"
      ng-change="$ctrl.getList()"
      class="form-control mb-4"
      ng-model="$ctrl.request.level"
    />
  </div>
</div>

<div
  ng-repeat="nav in $ctrl.pages.items | filter:$ctrl.searchText"
  class="container border-left-0 border-right-0 py-1 rounded-0"
>
  <div class="row">
    <div class="col-9">
      <div class="form-check form-switch">
        <input
          type="checkbox"
          ng-change="$ctrl.selectItem(nav)"
          ng-model="nav.isActived"
          id="parentNavs_{{$index}}"
          class="form-check-input"
        />
        <label
          class="custom-control-label align-middle"
          for="parentNavs_{{$index}}"
          ng-bind="nav.textDefault"
        >
        </label>
      </div>
    </div>
    <div class="col-3 text-end">
      <a
        ng-click="$ctrl.goToPath('/portal/permission/details/' + nav.id)"
        class="btn btn-link text-primary"
      >
        <span class="fas fa-pen"></span>
      </a>
    </div>
  </div>
</div>
<tabs-h select-callback="$ctrl.selectPane(pane)">
  <!--<pane-h header="Positions">
        <navs data="$ctrl.page.positionNavs" prefix="'pos'"/>
    </pane-h>-->
  <pane-h header="Children">
    <navs
      class="col-8"
      data="$ctrl.page.childNavs"
      details-url="'/portal/permission/details/'"
      key="'pageId'"
      title-column="'page.textDefault'"
      prefix="$ctrl.prefixChild"
    >
    </navs>
  </pane-h>
  <!-- <pane-h header="Parents">
    <navs
      data="$ctrl.page.parentNavs"
      details-url="'/portal/permission/details/'"
      key="'parentId'"
      title-column="'parent.textDefault'"
      prefix="$ctrl.prefixParent"
    ></navs>
  </pane-h> -->
</tabs-h>
